package bishi;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/9/13 14:43
 * @Version 1.0
 */
public class CCF20200901 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int[][] arr = new int[n][2];
        for (int i = 0; i < n; i++) {
            arr[i][0] = scanner.nextInt();
            arr[i][1] = scanner.nextInt();
        }
        ArrayList<Integer> list = new ArrayList<>();
        int min = Integer.MAX_VALUE;
        int index = 0;
        for (int i = 0; i < n; i++) {
            int temp = (arr[i][0] - x) * (arr[i][0] - x) + (arr[i][1] - y) * (arr[i][1] - y);
            if (temp < min) {
                min = temp;
                index = i;
            }
        }
        list.add(index + 1);
        arr[index][0] = Integer.MAX_VALUE;
        arr[index][1] = Integer.MAX_VALUE;
        min = Integer.MAX_VALUE;
        index = 0;
        for (int i = 0; i < n; i++) {
            int temp = (arr[i][0] - x) * (arr[i][0] - x) +  (arr[i][1] - y) * (arr[i][1] - y);
            if (temp < min) {
                min = temp;
                index = i;
            }
        }
        list.add(index + 1);
        arr[index][0] = Integer.MAX_VALUE;
        arr[index][1] = Integer.MAX_VALUE;
        min = Integer.MAX_VALUE;
        index = 0;
        for (int i = 0; i < n; i++) {
            int temp = (arr[i][0] - x) * (arr[i][0] - x) +  (arr[i][1] - y) * (arr[i][1] - y);
            if (temp < min) {
                min = temp;
                index = i;
            }
        }
        list.add(index + 1);
        arr[index][0] = Integer.MAX_VALUE;
        arr[index][1] = Integer.MAX_VALUE;
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
}
